<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增会员')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-members-add">
            <input name="membersId"  type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">手机号：</label>
                <div class="col-sm-8">
                    <input name="phone" class="form-control" type="text">
                </div>
            </div>
            <!--<div class="form-group">    -->
                <!--<label class="col-sm-3 control-label">密码：</label>-->
                <!--<div class="col-sm-8">-->
                    <!--<input name="password" th:field="*{password}" class="form-control" type="text">-->
                <!--</div>-->
            <!--</div>-->
            <!--<div class="form-group">    -->
                <!--<label class="col-sm-3 control-label">交易密码：</label>-->
                <!--<div class="col-sm-8">-->
                    <!--<input name="tradePassword" th:field="*{tradePassword}" class="form-control" type="text">-->
                <!--</div>-->
            <!--</div>-->
            <div class="form-group">    
                <label class="col-sm-3 control-label">性别：</label>
                <div class="col-sm-8">
                    <select name="sex" class="form-control m-b" th:with="type=${@dict.getType('sys_user_sex')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">状态：</label>
                <div class="col-sm-8">
                    <select name="status" class="form-control m-b">
                        <option th:text="停用" th:value="0"
                               ></option>
                        <option th:text="正常" th:value="1"
                                ></option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">级别Id：</label>
                <div class="col-sm-8">
                    <select name="levelId" class="form-control m-b" >
                        <option th:each="dict : ${mallLevels}" th:text="${dict.levelName}" th:value="${dict.levelId}" ></option>
                    </select>
                    <!--<input name="levelId" th:field="*{levelId}" class="form-control" type="text">-->
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">生日：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <span class="input-group-addon" ><i class="fa fa-calendar"></i></span>
                        <input name="birthDate"  class="form-control" placeholder="yyyy-MM-dd" type="text">
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">昵称：</label>
                <div class="col-sm-8">
                    <input name="nickName" class="form-control" type="number">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">现金余额：</label>
                <div class="col-sm-8">
                    <input name="money" class="form-control" type="number">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">积分：</label>
                <div class="col-sm-8">
                    <input name="integral" class="form-control" type="number">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">卡卷数：</label>
                <div class="col-sm-8">
                    <input name="cardRolls" class="form-control" type="number">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">礼品卡数：</label>
                <div class="col-sm-8">
                    <input name="giftCards" class="form-control" type="number">
                </div>
            </div>
            <!--<div class="form-group">    -->
                <!--<label class="col-sm-3 control-label">头像：</label>-->
                <!--<div class="col-sm-8">-->
                    <!--<input name="icon"  class="form-control" type="text">-->
                <!--</div>-->
            <!--</div>-->
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script type="text/javascript">
        var prefix = ctx + "mall/members";
        $("#form-members-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-members-add').serialize());
            }
        }
        $("input[name='birthDate']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>